package com.salon.server;


import javax.servlet.ServletContext;

/**
 * ������ ����� ���������� �������.
 *
 */
public class Parameters {
	private static String tempDirPath = null;
	private static String dbConnectionString = null;

	public static void init(ServletContext context) {
		String tempDirPath = context.getInitParameter("store-dir");
		if (tempDirPath != null && !tempDirPath.equals("")) {
			Parameters.tempDirPath = tempDirPath;
		}
		
		String dbConnectionString = context.getInitParameter("db-connection-string");
		if (dbConnectionString != null && !dbConnectionString.equals("")) {
			Parameters.dbConnectionString = dbConnectionString;
		}
	}
	
	/*public static String getTempDirPath() {
		return Parameters.tempDirPath;
	}
	
	public static String getServerName() {
		return Parameters.serverName;
	}*/
	
	public static String getDbConnectionString() {
		return Parameters.dbConnectionString;
	}
	
	public static String getStoreDir() {
		return Parameters.tempDirPath;
	}
}
